<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的粉丝</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
    <link rel="stylesheet" type="text/css" href="../css/aui-flex.css" />
    <style>
        body{
            font-size: 14px;
            background: #f3f3ff;
        }
        .aui-content{
            margin: 0;
        }
        .my-list{
            width: 100%;
            text-align: center;
            overflow: hidden;
            margin: 0;
            color: #000;
        }
        .haderUl li:after{
            border: none !important;
        }
        .my-list li{
            padding: 0 15px;

        }
        .my-list li span{
            float: left;
            display: block;

        }
        .my-list li span:nth-of-type(1){
            width: 40%;
            text-overflow: ellipsis;
            white-space:nowrap;
            overflow: hidden;

        }
        .my-list li span:nth-of-type(3),.my-list li span:nth-of-type(2){
            width: 30%;
            text-overflow: ellipsis;
            white-space:nowrap;
            overflow: hidden;

        }
        .my-list li{
            line-height: 45px;
            height: 45px;
        }
        .my-list li:nth-of-type(odd){
            background: #f8fdff;
        }
        .my-list li:first-of-type{
            background: #fff;
        }
        .aui-list-view .aui-img-object{
            max-width: 30px;
            height: 30px;
            line-height: 30px;
        }
        .aui-img-body{
            height: 30px;
            line-height: 30px;
        }
    </style>
</head>
<body>

<div class="aui-content">
    <div class="kongshuju">
        <p>暂无数据</p>
    </div>
    <ul class="aui-list-view after-no-border" id="fansList-content">
    </ul>
</div>
<script id="fansList-template" type="text/x-dot-template">
            {{ for(var i in it){ }}
            <li class="aui-list-view-cell aui-img ">
                <img class="aui-img-object aui-pull-left" src="{{=it[i].headimg}}">
                <div class="aui-img-body">
                    {{=it[i].real_name}}
                </div>
            </li>
            {{}}}

</script>


</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript" src="../script/doT.min.js" ></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/myInfo.js"></script>
<script type="text/javascript" src="../script/jquery-1.11.3.js"></script>
<script type="text/javascript" src="../script/iscroll2.js"></script>
<script type="text/javascript">
    var page = 1, categoryId = "", isLock = false;
    apiready = function () {
        api.parseTapmode();
        //监听是否达到底部上拉加载
        getFansList();
        api.addEventListener({
            name: 'scrolltobottom'
        }, function (ret, err) {
            page++;
            if (isLock == false) {
                getFansList();
            }
        })
    }
    function getFansList() {
        if (isLock)return;
        isLock = true;
        showLoading()
        var url = "User/subusers";
        var data = {};
        data['page']=page;
        getStorageAll();
        ajaxRequest(url, 'get', data, function (ret, err) {
            hideLoading();
            isLock = false;
            var content = $api.byId('fansList-content');
            var tpl = $api.byId('fansList-template').text;
            var tempFn = doT.template(tpl);
            if (page > 1) {
                if (!$.trim(ret.data)) {
                    isLock = true;
                }
                $api.append(content, tempFn(ret.data));
            } else {
                showNoTip(ret.data);
                $api.html(content, tempFn(ret.data));
            }
        });
    }
</script>
</html>